<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>用户信息</title>

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/datepicker3.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<link href="css/ddj.css" rel="stylesheet"><!-- 深度定制样式： -->

</head>

<body>
<!-- 头部 -->
	<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sidebar-collapse">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#">
					<span>旧货追踪管理系统</span>
					Admin
				</a>
				<ul class="user-menu">
					<li class="dropdown pull-right">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-user"></span> User <span class="caret"></span></a>
						<ul class="dropdown-menu" role="menu">
							<li><a href="#"><span class="glyphicon glyphicon-user"></span> Profile</a></li>
							<li><a href="#"><span class="glyphicon glyphicon-cog"></span> Settings</a></li>
							<li><a href="#"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
						</ul>
					</li>
				</ul>
			</div>
		</div><!-- /.container-fluid -->
	</nav>

<!-- 侧边菜单 -->		
	<div id="sidebar-collapse" class="col-sm-3 col-lg-2 sidebar">
		<form role="search">
			<div class="form-group">
				<input type="text" class="form-control" placeholder="Search">
			</div>
		</form>
		<ul class="nav menu">
			<li>
				<a href="index.html">
					<span class="glyphicon glyphicon-dashboard"></span>
					 首页
				</a>
			</li>
			<li><a href="productAdd.html"><span class="glyphicon glyphicon-th"></span> 商品上架</a></li>
			<li><a href="readAndWrite.html"><span class="glyphicon glyphicon-stats"></span> 读取</a></li>
			<li class="active"><a href="productAdmin.html"><span class="glyphicon glyphicon-list-alt"></span> 商品信息</a></li>
			<li><a href="userall.html"><span class="glyphicon glyphicon-stats"></span> 用户信息</a></li>
			<li><a href="trade.html"><span class="glyphicon glyphicon-user"></span>订单信息</a></li>
			
		</ul>
		<div class="attribution">Make by ddj <a href="http://www.cssmoban.com/" target="_blank" title="模板之家">来源</a> - Collect from <a href="http://www.cssmoban.com/" title="网页模板" target="_blank">网址之家</a></div>
	</div><!--/.sidebar-->
<!-- 右边主区 -->		
	<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">			
		<div class="row">
			<ol class="breadcrumb">
				<li><a href="#"><span class="glyphicon glyphicon-home"></span></a></li>
				<li class="active">首页</li>
			</ol>
		</div><!--/.row-->
			
		<div class="row">
			<div class="userall-panel">
				<div class="login-panel panel panel-default">
					<div class="panel-heading">商品详情</div>
					<div class="panel-body">
						<form role="form">
							<table>
								<tr>
									<th>序号</th>
									<th>商品ID</th>
									<th>商品价格</th>
									<th>商品新旧程度</th>
									<th>目前所属用户</th>
									<th>交易次数</th>
									<th>最近成交时间</th>
									<th>查看详情</th>
								</tr>
								<c:if test="${plist!=null }">
								<c:forEach items="${plist }" var="list" varStatus="st">
								<tr border="1px">
									<td>${st.count }</td>
									<td >${list.pname }</td>
									<td>${list.price }</td>
									<td>${list.degree }</td>
									<td>${list.userName }</td>
									<td>${list.tradeTimes }</td>
									<td><fmt:formatDate value="${list.lastTradeTime}" /></td>
									
									<td><a href="<c:url value="/tradeByPid.html?pid=${list.pid }"/>">交易详情</a></td>
<%-- 									<td><input type="button" value="详情" class="detail" id="${list.pname}"></td>
 --%>								</tr>
								</c:forEach>
								</c:if>
								
							</table>
						</form>
					</div>
				</div>
            </div>								
		</div>
<!-- 商品细节区 -->		
		
	</div>	<!--/.main-->
	
<!-- 脚本加载 -->
	<script src="js/jquery-1.11.1.min.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/chart.min.js"></script>
	<script src="js/chart-data.js"></script>
	<script src="js/easypiechart.js"></script>
	<script src="js/easypiechart-data.js"></script>
	<script src="js/bootstrap-datepicker.js"></script>
	<script>
	
		!function ($) {
		    $(document).on("click","ul.nav li.parent > a > span.icon", function(){          
		        $(this).find('em:first').toggleClass("glyphicon-minus");      
		    }); 
		    $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
		}(window.jQuery);

		$(window).on('resize', function () {
		  if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')
		})
		$(window).on('resize', function () {
		  if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
		})
			    /*  function detail() {
						var name=$(".name").text();
						alert(name)
						
						return true;	
				} */
	$(function(){
		$(".detail").click(function() {
			 var id=$(this).attr("id")
			 alert(id) 
			 /* $.ajax({
					url:"/recycle/productDetail", 
					data:{id:id}, 
					dataType:"json",
					async:true,
					cache:false,
					success:function(result) {
						
					
					}
				});*/
		}); 
	
	
	})
	</script>	
</body>

</html>
